#/usr/bin/python
#-*-<coding=UTF-8>-*-

"""
本例展示了
"""

import wx

class Frame(wx.Frame):
    
    def __init__(self):
        wx.Frame.__init__(self,parent=None,id=-1,title="",pos=wx.DefaultPosition,size=wx.DefaultSize)
        panel = wx.Panel(self,-1)
        wx.StaticText(panel,-1,"This is an example of static text",pos=(100,10),size=(500,20))

        rev = wx.StaticText(parent=panel,id=-1,label="StaticText with reversed colors",pos=(100,30))
        rev.SetForegroundColour("white")
        rev.SetBackgroundColour("black")

        center = wx.StaticText(panel,-1,"aligned center",(100,50),(160,-1),wx.ALIGN_CENTER)
        center.SetForegroundColour("white")
        center.SetBackgroundColour("black")

        right = wx.StaticText(panel,-1,"aligned center",(100,50),(160,-1),wx.ALIGN_RIGHT)
        right.SetForegroundColour("white")
        right.SetBackgroundColour("black")

        string = "You can also change the font"
        text = wx.StaticText(panel,-1,string,(20,100))
        font = wx.Font(18,wx.DECORATIVE,wx.ITALIC,wx.NORMAL)
        text.SetFont(font)

        wx.StaticText(panel,-1,"You text\ncan bi split\nover multiple lines\neven blank ones",(10,150))

        wx.StaticText(panel,-1,"Multi-line test\ncan also\n""be right aligned\n\neven whit a blank",(220,150),style=wx.ALIGN_RIGHT)


if __name__ == "__main__":
    app = wx.PySimpleApp()
    frame = Frame()
    frame.Show()
    app.MainLoop()
